//
//  NaviView.m
//  Shengzhuli
//
//  Created by FXGuo on 2018/2/2.
//  Copyright © 2018年 kamangkeji. All rights reserved.
//

#import "NaviView.h"

@interface NaviView()
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *addressLab;
@property (weak, nonatomic) IBOutlet UILabel *disLab;


@end

@implementation NaviView

+ (NaviView *)naViView
{
    NaviView *view = [[NSBundle mainBundle] loadNibNamed:@"NaviView" owner:nil options:nil].lastObject;
    view.backgroundColor = [UIColor whiteColor];
    return view;
}
- (void)setModel:(NewMapModel *)model
{
    _model = model;
    self.nameLab.text = model.clubName;
    if (model.address) {
        self.addressLab.text = model.address;
    }else {
        self.addressLab.text = @" ";
    }
    self.disLab.text = model.distance;
}
- (IBAction)naviClick:(UIButton *)sender
{
    if (self.naviBlock) {
        self.naviBlock();
    }
}

@end
